#include <bits/stdc++.h>
using namespace std;
double d;
int main(void){
    int t;
    scanf("%d",&t);
    while(t--){
        scanf("%lf",&d);
        if(d<4 && d!=0){
            printf("N\n");
        }else{
            double b=(d+sqrt(d*d-4*d))/2;
            double a=d-b;
            printf("Y %.9lf %.9lf\n",b,a);
        }
    }
    return 0;
}